Schedule 1Schedule 1

Understanding the Mixing Algorithm in Schedule 1

on 3 days ago

Introduction

The mixing system is at the heart of Schedule 1's gameplay, allowing players to create unique drug combinations with various effects and profit margins. While the game presents this as a straightforward process, behind the scenes lies a sophisticated algorithm that determines how substances interact, which effects are triggered, and how the final product's value is calculated. In this deep dive, we'll explore the inner workings of the mixing algorithm and demonstrate it with a complex example.

The Fundamentals of Mixing

Before we delve into the technical details, let's review the basic components of the mixing system:

  1. Base Products: Every mix starts with a base product (Weed, Meth, or Cocaine), each with its own base price and potential effects.
  2. Substances: Additional ingredients that can be added to the base product, each with a default effect and price.
  3. Effects: Properties that determine the characteristics and value of the final product.
  4. Interaction Rules: Rules that govern how substances interact with existing effects, potentially replacing them with new ones.

You can explore the complete list of available effects and interaction rules on our dedicated pages.

How the Algorithm Works

The mixing algorithm follows a sequential process, handling each substance one at a time. This approach creates a dynamic system where the order of substances matters significantly. Here's how it works:

Step 1: Initialize with Base Product

The process begins by selecting a base product and initializing the current effects list with the base product's inherent effects.

Step 2: Add Substances Sequentially

For each substance added:

  1. Apply Interaction Rules: The system checks if any of the substance's interaction rules apply to the current effects list. If a rule matches (the "ifPresent" condition is met), the specified effect is replaced with a new one.

  2. Add Default Effect: If the current effects list has fewer than 8 effects and doesn't already include the substance's default effect, the default effect is added.

  3. Update Effects List: The effects list is updated, ensuring no duplicate effects exist.

Step 3: Calculate Costs and Price

Once all substances have been processed:

  1. Calculate Cost: Sum the prices of all effective substances (excluding those that couldn't contribute due to the 8-effect limit).

  2. Calculate Effect Multiplier Sum: Add up the multiplier values of all effects in the final list.

  3. Calculate Selling Price: Base product price × (1 + Effect multiplier sum)

  4. Calculate Profit: Selling price - Cost

Interaction Rules in Detail

The interaction rules system is particularly interesting. When a substance is added, it can trigger rules that replace existing effects with new ones. These rules follow specific principles:

  • Each substance can have multiple rules that trigger based on existing effects
  • Rules are applied in order, and the effects list is updated after each rule application
  • A substance can trigger multiple rules if multiple conditions are met
  • If a rule would add an effect that already exists, it's skipped

This creates a complex web of interactions where the final outcome depends on the specific combination and order of substances.

A Complex Example: Cocaine Mix

Let's walk through a complex example to see the algorithm in action. We'll create a mix with Cocaine as the base product and add several substances in sequence.

Starting Point: Cocaine (Base Product)

Cocaine starts with no inherent effects.

Adding Motor Oil

Calculator Step 1

When we add Motor Oil:

  • No interaction rules are triggered
  • Default effect "Slippery" is added
  • Current effects: ["Slippery"]

Adding Cuke

Calculator Step 2

When we add Cuke:

  • Rule triggered: "Slippery" → "Munchies"
  • Default effect "Energizing" is added
  • Current effects: ["Munchies", "Energizing"]

Adding Paracetamol

Calculator Step 3

When we add Paracetamol:

  • Rules triggered:
    • "Munchies" → "Anti-Gravity"
    • "Energizing" → "Paranoia"
  • Default effect "Sneaky" is added
  • Current effects: ["Anti-Gravity", "Paranoia", "Sneaky"]

Adding Gasoline

Calculator Step 4

When we add Gasoline:

  • Rules triggered:
    • "Paranoia" → "Calming"
    • "Sneaky" → "Tropic Thunder"
  • Default effect "Toxic" is added
  • Current effects: ["Anti-Gravity", "Calming", "Tropic Thunder", "Toxic"]

Adding Cuke (Again)

Calculator Step 5

When we add Cuke again:

  • Rule triggered: "Toxic" → "Euphoric"
  • Default effect "Energizing" is added (since it's not in the list anymore)
  • Current effects: ["Anti-Gravity", "Calming", "Tropic Thunder", "Euphoric", "Energizing"]

Adding Battery

Calculator Step 6

When we add Battery:

  • Rule triggered: "Euphoric" → "Zombifying"
  • Default effect "Bright-Eyed" is added
  • Current effects: ["Anti-Gravity", "Calming", "Tropic Thunder", "Zombifying", "Energizing", "Bright-Eyed"]

Adding Horse Semen

Calculator Step 7

When we add Horse Semen:

  • No interaction rules are triggered
  • Default effect "Long Faced" is added
  • Current effects: ["Anti-Gravity", "Calming", "Tropic Thunder", "Zombifying", "Energizing", "Bright-Eyed", "Long Faced"]

Adding Mega Bean

Calculator Step 8

When we add Mega Bean:

  • Rules triggered:
    • "Calming" → "Glowing"
    • "Energizing" → "Cyclopean"
  • Default effect "Foggy" is added
  • Current effects: ["Anti-Gravity", "Glowing", "Tropic Thunder", "Zombifying", "Cyclopean", "Bright-Eyed", "Long Faced", "Foggy"]

Final Calculation

With our final list of 8 effects, each with its own multiplier:

  • Anti-Gravity: ×0.54
  • Glowing: ×0.48
  • Tropic Thunder: ×0.46
  • Zombifying: ×0.58
  • Cyclopean: ×0.56
  • Bright-Eyed: ×0.40
  • Long Faced: ×0.52
  • Foggy: ×0.36

Total multiplier: 3.90

Base price: $150 Total cost of substances: $42 Final selling price: $150 × (1 + 3.90) = $735 Profit: $735 - $42 = $693

Visualizing the Process

The calculate detail page provides a comprehensive breakdown of any mix, you can enter it by mixing-result card or recipe info card in recipe detail page. showing:

  1. Effects Info: All final effects and their multipliers
  2. Substances Used: All substances added to the mix and their costs
  3. Price Calculation: How the final price and profit are calculated
  4. Mixing Process: A step-by-step breakdown of what happened during mixing

Calculation Details

Advanced Mixing Strategies

Understanding the algorithm opens up strategic possibilities:

  1. Order Matters: The sequence in which you add substances can dramatically change the outcome. Experiment with different orders to optimize your mix.

  2. Effect Limit Management: Since there's an 8-effect limit, plan your mix to ensure the most valuable effects make it into the final product.

  3. Cost Optimization: Some substances might be ineffective if their default effect can't be added due to the effect limit. Avoid these to minimize costs.

Try It Yourself

Calculation Details

Ready to create your own mixes? Head to our home page to use our mixing calculator, or browse our recipes page for inspiration from other users.

For those interested in the technical implementation, you can explore our rules page to see all possible interaction rules and understand how they might affect your mixes.

Conclusion

The mixing system in Schedule 1 is a fascinating example of how simple rules can create complex and emergent gameplay. By understanding the underlying algorithm, you can create more effective and profitable mixes, giving you an edge in the game's economy.

Whether you're a casual player looking to maximize profits or a min-maxer seeking the perfect combination, mastering the mixing algorithm is key to success in Schedule 1.

Happy mixing!